package ar.rhok.yerbus.core.services.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ar.rhok.yerbus.core.dao.EntityDAO;
import ar.rhok.yerbus.core.domain.Entity;
import ar.rhok.yerbus.core.services.EntityService;

@Service
@Transactional
public class EntityServiceImpl implements EntityService {

	@Autowired
	private EntityDAO entityDAO;
	
	@Override
	public Entity createEntity(String pName) {
		final Entity e = new Entity();
		e.setName(pName);
		entityDAO.save(e);
		return e;
	}

}
